<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

session_start();
require_once('twitteroauth/twitteroauth.php');
require_once('config.php');

/* Get user access tokens out of the session. */
/* Create a TwitterOauth object with consumer/user tokens. */
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, '330587105-JOG8jZR12D71PfN7JNbT6lq8IGgcmOP9O4WsUbCD', 'pwAWZ3EZLaFii2PolgiybiT0Jbs8v7mMgh38IoSq0');

/* If method is set change API call made. Test is called by default. */
//$connection->post('statuses/update', array('status' => date(DATE_RFC822)));

$connection->get('account/verify_credentials');
$url= $connection->url;



$json_string =  json_decode(file_get_contents($url, true),true);

$time = $json_string['created_at'];
$time= date_parse($time);

echo $time["day"];



?>
